{template 'common/header'}
<style>
	.account-stat{overflow:hidden; color:#666;}
	.account-stat .account-stat-btn{width:100%; overflow:hidden;}
	.account-stat .account-stat-btn > div{text-align:center; margin-bottom:5px;margin-right:2%; float:left;width:18%; padding-top:10px;font-size:16px; border-left:1px #DDD solid;}
	.account-stat .account-stat-btn > div:first-child{border-left:0;}
	.account-stat .account-stat-btn .stat{width:80%;margin:10px auto;font-size:15px}
</style>
<ul class="nav nav-tabs">
	<li><a href="{php echo url('mc/creditmanage/display')}">会员中心</a></li>	
	<li class="active"><a href="{php echo url('mc/creditall',array('type' => 1));}">会员积分</a></li>
</ul>
	<div class="panel panel-default">
	<nav class="navbar navbar-default navbar-static-top" role="navigation" style="margin: -1em -1em 1em -1em;">
		<div class="navbar-header">
			<a class="navbar-brand" href="javascript:;">数据统计</a>
			<ul class="nav navbar-nav navbar-right">
				<!--<li {if $_GPC['type'] == 1}class="active"{/if}><a href="{php echo url('mc/creditall',array('type' => 1));}">今日</a></li>
				<li {if $_GPC['type'] == -1}class="active"{/if}><a href="{php echo url('mc/creditall',array('type' => -1));}">昨日</a></li>-->
				<form class="navbar-form navbar-left" role="search" id="form1">
					<input name="c" value="mc" type="hidden" />
					<input name="a" value="creditall" type="hidden" />
					<input name="uniacid" value="{$uniacid}" type="hidden" />
					{php echo tpl_form_field_daterange('datelimit', array('start' => date('Y-m-d', $starttime),'end' => date('Y-m-d', $endtime)), '')}
				<button class="btn btn-default" name="export" value="export"><i class="fa fa-download"></i> 导出数据</button>
				（温馨提示：只有选择了时间段才能导出数据！）
				</form>
			</ul>
		</div>
			</nav>
	
	<div class=" panel-body table-responsive">
		<table class="table table-hover">
			<thead>
				<tr>
					<th style="width:100px;">序号</th>
					<th style="width:100px">会员编号</th>
					<th style="width:100px">会员名</th>
					<th style="width:100px">积分类型</th>
					<th style="width:100px">积分数量</th>

					<th style="width:200px">操作时间</th>
					<th>备注</th>
				</tr>
			</thead>
			<tbody>
				{loop $list $li}
					<tr>
					    <td style="vertical-align:middle">{$li['id']}</td>
						<td style="vertical-align:middle">{$li['uid']}</td>
						<td style="vertical-align:middle">{$li['nickname']}</td>
						<td>{if $creditnames[$type]['title']} {$creditnames[$type]['title']} {else} 积分{/if}</td>	
						<td>{$li['num']}</td>

						<td>{php echo date('Y-m-d H:i:s', $li['createtime'])}</td>	
						<td>{$li['remark']}</td>
					</tr>
				{/loop}
			</tbody>
		</table>
	</div>
</div>
<script>
	require(['chart', 'jquery', 'daterangepicker'], function(c, $) {
		$('.daterange').on('apply.daterangepicker', function(ev, picker) {
			$('#form1')[0].submit();
		});
	});
</script>
{$pager}
{template 'common/footer'}